package cn.powertime.evaluation.config;

import org.jasypt.util.text.BasicTextEncryptor;

/**
 * @author yyd
 * @version V1.0
 * @Package cn.powertime.evaluation.config
 * @date 2019/12/16 17:20
 */
public class MyTest {

    public static void main(String[] args) {
        BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
        //加密所需的salt(盐)
        textEncryptor.setPassword("123456");
        //要加密的数据（数据库的用户名或密码）
        String username = textEncryptor.encrypt("123456");
        String password = textEncryptor.encrypt("root");
        System.out.println("username:"+username);
        System.out.println("password:"+password);
    }
}
